<template>
  <div>
    <!-- 列表 -->
    <!-- 3.传给list -->
    <v-List @willUpdate="willUpdate"></v-List>

    <!-- 弹框 -->
   
    <v-form :status="status" ref="form"></v-form>
  </div>
</template>

<script>
import vList from "./components/list.vue";
import vForm from "./components/form.vue";



export default {
  components: {
    vList,
    vForm
  },
  data() {
    return {
      status: {
        isshow: false, //控制弹框是否出现
        isAdd: true //是添加的弹框还是编辑的弹框
      },
      // 1  初始化一个数组
      list: []
    };
  },
  methods: {
    // 点击了编辑
    willUpdate(uid) {
      this.status = {
        isshow: true,
        isAdd: false
      };
      this.$refs.form.getOne(uid)
     
    },
   
  },
  mounted() {
  }
};
</script>

<style lang="less" scoped>
@import "../../less/index.less";
</style>